package com.sam.questionBank;

/**
 * 一个for打印99乘法表
 */
public class OneFor99 {
    public static void main(String[] args) {
        for (int i = 1, j = 1; i <= j; i++) {
            System.out.print(String.format("%d*%d=%d", i, j, i * j));
            if (i == j && i < 9) {
                System.out.println();
                i = 0;
                j++;
            } else {
                if (i < 9) {
                    System.out.print(",");
                }
            }
        }
    }
}
